********************************************************************************
*																			   *
*						Sir! I'd Rather Go to School Sir!					   *
*																			   *
*								 Mahdi Majbouri								   *
*																			   *
*									 Table B1								   *
*																			   *
*									6-6-2023								   *
*																			   *
********************************************************************************

********************************************************************************
**  Diff-in-Disc - Sample I - sole sons and their sisters
********************************************************************************

use "census11-all.dta", clear

keep if fage>=fage18 & fage18>=threshold - 9 & fage18<=threshold + 10
keep if urban == 2

gen s = (sons==1 & son==1) if sons!=.
gen st = s * t
gen sfa = s * fa
gen stfa = s * t * fa

gen sfasq = s * fasq
gen stfasq = s * t * fasq

gen sfacb = s * facb
gen stfacb = s * t * facb

gen sfed = s * father_ed 
gen smed = s * mom_ed
gen sfage = s * fage
gen smage = s * mage

gen dfa = sfa
replace dfa = 100 *fa if s == 0

regress college_plus st t fa tfa s sfa stfa father_ed mom_ed fage mage ///
		sfed smed sfage smage if relate==3 & sons == 1 & fage>=fage18, vce(cluster dfa)
outreg2 using "Table B1", excel adjr2 se alpha(0.01,0.05,0.10) ///
		symbol(***,**,*) bdec(3) sdec(3) rdec(3) ctitle("SISTERS") replace

regress college_plus st t fa tfa fasq tfasq s sfa stfa sfasq stfasq ///
		father_ed mom_ed fage mage sfed smed sfage smage if relate==3 & sons == 1 & fage>=fage18, ///
		vce(cluster dfa)
outreg2 using "Table B1", excel adjr2 se alpha(0.01,0.05,0.10) ///
		symbol(***,**,*) bdec(3) sdec(3) rdec(3) ctitle("SISTERS") append

regress college_plus st t fa tfa fasq tfasq facb tfacb s sfa stfa sfasq ///
		stfasq sfacb stfacb father_ed mom_ed fage mage sfed smed sfage smage if relate==3 & sons == 1 ///
		& fage>=fage18, vce(cluster dfa)
outreg2 using "Table B1", excel adjr2 se alpha(0.01,0.05,0.10) ///
		symbol(***,**,*) bdec(3) sdec(3) rdec(3) ctitle("SISTERS") append
		


		
********************************************************************************
***  Diff-in-Disc - Sample II -  sole sons, their sisters, & sons in multiple-
***  son HHs
********************************************************************************


use "census11-all.dta", clear

keep if fage>=fage18 & fage18>=threshold - 9 & fage18<=threshold + 10
keep if urban == 2

drop if sons == 0

gen s = (sons==1 & son==1) if sons!=. & relate == 3
replace s = . if sons > 1 & son == 0
gen st = s * t
gen sfa = s * fa
gen stfa = s * t * fa

gen sfasq = s * fasq
gen stfasq = s * t * fasq

gen sfacb = s * facb
gen stfacb = s * t * facb

gen sfed = s * father_ed 
gen smed = s * mom_ed
gen sfage = s * fage
gen smage = s * mage

gen dfa = sfa
replace dfa = 100 *fa if s == 0

regress college_plus st t fa tfa s sfa stfa father_ed mom_ed fage mage sfed smed sfage smage if ///
		relate==3 & sons > 0 & fage>=fage18 & urban == 2, vce(cluster dfa)
outreg2 using "Table B1", excel adjr2 se alpha(0.01,0.05,0.10) ///
		symbol(***,**,*) bdec(3) sdec(3) rdec(3) ctitle("SIS+SONSMS") append

regress college_plus st t fa tfa fasq tfasq s sfa stfa sfasq stfasq ///
		father_ed mom_ed fage mage sfed smed sfage smage if relate==3 & sons > 0 & fage>=fage18 ///
		& urban == 2, vce(cluster dfa)
outreg2 using "Table B1", excel adjr2 se alpha(0.01,0.05,0.10) ///
		symbol(***,**,*) bdec(3) sdec(3) rdec(3) ctitle("SIS+SONSMS") append

regress college_plus st t fa tfa fasq tfasq facb tfacb s sfa stfa sfasq ///
		stfasq sfacb stfacb father_ed mom_ed fage mage sfed smed sfage smage if relate==3 & sons > 0 & ///
		fage>=fage18 & urban == 2, vce(cluster dfa)
outreg2 using "Table B1", excel adjr2 se alpha(0.01,0.05,0.10) ///
		symbol(***,**,*) bdec(3) sdec(3) rdec(3) ctitle("SIS+SONSMS") append
		


		

		
********************************************************************************
***  Diff-in-Disc - Sample III -  sole sons, their sisters, sons in multiple-
***  son HHs, & daughters in multiple-son HHs
********************************************************************************


use "census11-all.dta", clear

keep if fage>=fage18 & fage18>=threshold - 9 & fage18<=threshold + 10
keep if urban == 2

drop if sons == 0

gen s = (sons==1 & son==1) if sons!=. & relate == 3
gen st = s * t
gen sfa = s * fa
gen stfa = s * t * fa

gen sfasq = s * fasq
gen stfasq = s * t * fasq

gen sfacb = s * facb
gen stfacb = s * t * facb

gen sfed = s * father_ed 
gen smed = s * mom_ed
gen sfage = s * fage
gen smage = s * mage

gen dfa = sfa
replace dfa = 100 * fa if s == 0

regress college_plus st t fa tfa s sfa stfa father_ed mom_ed fage mage sfed smed sfage smage if ///
		relate==3 & sons > 0 & ///
		fage>=fage18 & urban == 2, vce(cluster dfa)
outreg2 using "Table B1", excel adjr2 se alpha(0.01,0.05,0.10) ///
		symbol(***,**,*) bdec(3) sdec(3) rdec(3) ctitle("ALL") append

regress college_plus st t fa tfa fasq tfasq s sfa stfa sfasq stfasq ///
		father_ed mom_ed fage mage sfed smed sfage smage if relate==3 & sons > 0 & fage>=fage18 & ///
		urban == 2, vce(cluster dfa)
outreg2 using "Table B1", excel adjr2 se alpha(0.01,0.05,0.10) ///
		symbol(***,**,*) bdec(3) sdec(3) rdec(3) ctitle("ALL") append

regress college_plus st t fa tfa fasq tfasq facb tfacb s sfa stfa sfasq ///
		stfasq sfacb stfacb father_ed mom_ed fage mage sfed smed sfage smage if relate==3 & sons > 0 ///
		& fage>=fage18 & urban == 2, vce(cluster dfa)
outreg2 using "Table B1", excel adjr2 se alpha(0.01,0.05,0.10) ///
		symbol(***,**,*) bdec(3) sdec(3) rdec(3) ctitle("ALL") append
	

		
		
********************************************************************************
*********************************  THE END *************************************
********************************************************************************
